package com.md.drcs.dicom.entity;

import com.md.common.utils.json.JSONUtil;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 功能描述：m_im_message表实体
 * 
 * @author liuzg1@guahao.com
 * @version 1.0
 * @date 2018/12/11 18:04
 * @since JDK 1.8
 */
@Table(name = "m_im_message")
public class ImMessageEntity implements Serializable{
	
	//columns START
	/**
	 * id
	 */
	@Id
	@Column(name = "id")
	private Integer id;
	/**
	 * from_user_id
	 */
	@Column(name = "from_user_id")
	private Integer fromUserId;
	/**
	 * to_user_id
	 */
	@Column(name = "to_user_id")
	private Integer toUserId;
	/**
	 * key
	 */
	@Column(name = "type")
	private String type;
	/**
	 * content
	 */
	@Column(name = "content")
	private String content;
	/**
	 * status
	 */
	@Column(name = "status")
	private Integer status;
	/**
	 * create_time
	 */
	@Column(name = "create_time")
	private LocalDateTime createTime;
	//columns END 数据库字段结束
	
	//get and set
	public void setId(Integer id) {
		this.id = id;
	}
	
	public Integer getId() {
		return this.id;
	}
	
	public void setFromUserId(Integer fromUserId) {
		this.fromUserId = fromUserId;
	}
	
	public Integer getFromUserId() {
		return this.fromUserId;
	}
	
	public void setToUserId(Integer toUserId) {
		this.toUserId = toUserId;
	}
	
	public Integer getToUserId() {
		return this.toUserId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setContent(String content) {
		this.content = StringUtils.trim(content);
	}
	
	public String getContent() {
		return this.content;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public Integer getStatus() {
		return this.status;
	}
	
	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}
	
	public LocalDateTime getCreateTime() {
		return this.createTime;
	}
	
	
	public String toString() {
		return JSONUtil.toJSON(this);
	}
	
}

	
